--[[
	等候界面
		2016_04_27 C.P
	功能：阻断用户输入，防止不必要的情况
]]
local ExternalFun = appdf.req(appdf.EXTERNAL_SRC .. "ExternalFun")
local TipLayer = class("TipLayer", function(isTransparent)
	if isTransparent then
		return display.newLayer(cc.c4b(0, 0, 0, 0))
	else
	 	return display.newLayer(cc.c4b(0, 0, 0, 0))
	end    
end)

function TipLayer:ctor(isTransparent)
	
	if width == nil or height == nil then
		self:setContentSize(display.width,display.height)
	else
		self:setContentSize(width,height)
	end
	
	local function onTouch(eventType, x, y)
		if y > display.height/2 or (y<100 and x > display.width - 100) then
			return false
		end
        return true
    end
	self:setTouchEnabled(true)
	self:registerScriptTouchHandler(onTouch)
    
end

function TipLayer:initWaitTip( ... )
    display.newSprite("public/waitdi.png")
	:addTo(self, 0)
	:setPosition(cc.p(display.cx , display.cy))

	self.wait_nex_game = display.newSprite("public/wait_nex_gamet.png")
	:addTo(self, 0)
	:setAnchorPoint(0, 0.5)
	:setPosition(cc.p(display.cx -300, display.cy))

end

return TipLayer